<?php
namespace Depart\Model;
// use Common\Model\BaseModel;
use Think\Model;
use Think\Model\RelationModel;
class ProdModel extends RelationModel{
	
	protected $tableName='prod_progress';
	// protected $fields = array(
 //            'id', 'dwgcode', 'dwgname', 'date', 
 //            // _pk 表示主键字段名称 
 //            '_pk' => 'id',
            
 //            );
	protected $_link=array(
		'dwg'=>array(
			'mapping_type'=>self::BELONGS_TO,
			'foreign_key'=>'dwgid',
			'mapping_fields'=>'dwgname,spec',
			'as_fields'=>'dwgname:prodname,spec:spec'
		),
		/*'prodInfo'=>array(
			'mapping_type'=>self::HAS_MANY,
			'foreign_key'=>'batchid',
			'mapping_fields'=>'prodsn',
			'as_fields'=>'prodsn:prodsn',
		),*/
	);
}
?>